<template>
    <div class="SwipeBox">
        <div v-if="list.style==1&&list.type==1">
            <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
                <van-swipe-item v-for="item in listArr" :key="item.url">
                    <!-- {{item.url}} -->
                    <img :src="item.img.url" />
                    <!-- <van-image width="100%" height="100%" src="https://img01.yzcdn.cn/vant/cat.jpeg" /> -->
                </van-swipe-item>
            </van-swipe>
        </div>
    </div>
</template>

<script>
export default {
    props: {
        list: Object,
    },
    computed: {
        listArr() {
            return this.list.data;
        },
    },
};
</script>

<style lang="scss" scoped>
.SwipeBox {
    padding: 0 0.18rem;
    border-radius: 0.24rem;
    overflow: hidden;
    .my-swipe .van-swipe-item {
        color: #fff;
        font-size: 20px;
        text-align: center;
        width: "7.14rem";
        height: "3.98rem";
        img {
            width: 100%;
            height: 100%;
        }
    }
}
</style>